<div class="right_top">
  <span class="more">
      <a href="/news?important=1" target="_blank">
        <span class="new_gnegduo">更多</span><i></i><i></i><i></i>
      </a>
  </span>
  <span class="right_title">校园要闻</span>
</div>

<div class="main_content clearfix">
  <div class="left">
    <% if @school_important_news.first %>
    <% if @toutiao %>
        <a href="/news/<%= @toutiao.id %>?important=1" target="_blank"> 
          <h2><%= guolv_title @toutiao.yaowen_title %></h2>
          <p class="prompt">
            <%= @toutiao.toutiao_content[0..120] if @toutiao.toutiao_content %>...
          </p>
        </a>
    <% end %>
    <ul>
      <% @school_important_news[0..9].each do |news| %>
        <li>
          <a href="/news/<%= news.id %>?important=1" class="clearfix" target="_blank">
            <span class="time"><%= news.pubtime.to_date %></span>
            <span class="content_icon"></span>
            <span class="p_text">
              <%=guolv_title news.title  %>
                      
              <%= "[图文]" if check_image_src news%>
            </span>
          </a>
        </li>
      <%end%>
    </ul>
    <%end%>
  </div>
  <div class="right" id="contentImage">
    <% if @top_news %>
      <div class="images" >
        <i class="slideLeft"></i>
        <i class="slideRight"></i>
        <ul id="imgess">
          <% @top_news.each do |news| %>
            <% if news.first_image.present? %>
              <li>
                <a href="<%= news.link_url %>" target="_blank">
                  <%= image_tag(news.first_image, :width => 460, :height => 350) %>
                </a>
              </li>
            <% end %>
            <% if news.second_image.present? %>
              <li>
                <a href="<%= news.link_url %>" target="_blank">
                  <%= image_tag(news.second_image, :width => 460, :height => 350) %>
                </a>
              </li>
            <% end %>
            <% if news.third_image.present? %>
              <li>
              <a href="<%= news.link_url %>" target="_blank">
                <%= image_tag(news.third_image, :width => 460, :height => 350) %>
              </a>
            </li>
            <% end %>
            <% if news.fourth_image.present? %>
              <li>
                <a href="<%= news.link_url %>" target="_blank">
                  <%= image_tag(news.fourth_image, :width => 460, :height => 350) %>
                </a>
              </li>
            <% end %>
            <% if news.fifth_image.present? %>
              <li>
                <a href="<%= news.link_url %>" target="_blank">
                  <%= image_tag(news.fifth_image, :width => 460, :height => 350) %>
                </a>
              </li>
            <% end %>
          <% end %>
        </ul>
      </div>
      <div class="tips">
        <ul class="titles">
          <% @top_news.each_with_index do |news, i| %>
            <% if news.first_image_url %>
              <li style="display:block" >
                <h2><%= news.title %></h2>
                <br>
                <h3><%= news.content %></h3>
              </li>  
            <% end %>
            <% if news.second_image_url %>
              <li >
                <h2><%= news.title %></h2>
                <br>
                <h3><%= news.content %></h3>
              </li>
            <% end %>
            <% if news.third_image_url %>
              <li>
                <h2><%= news.title %></h2>
                <br>
                <h3><%= news.content %></h3>
              </li>
            <% end %>
            <% if news.fourth_image_url %>
              <li >
                <h2><%= news.title %></h2>
                <br>
                <h3><%= news.content %></h3>
              </li>
            <% end %>
            <% if news.fifth_image_url %>
              <li >
                <h2><%= news.title %></h2>
                <br>
                <h3><%= news.content %></h3>
              </li>
            <% end %>
            
          <% end %>
        </ul>
      </div>
    <% end %>
  </div>
</div>
